package com.wdc.patterns.adapter.object_adapter;


public class SDAdapterTF implements SDCCard {

    //申明适配者类
    private TFCard tfCard;

    //提供有参构造
    public SDAdapterTF(TFCard tfCard) {
        this.tfCard = tfCard;
    }

    @Override
    public String readSD() {
        System.out.println("adapter read TF card");
        return tfCard.readTF();
    }

    @Override
    public void saveSD(String data) {
        System.out.println("adapter write TF card");
        tfCard.writeTF(data);

    }
}
